const app = getApp()
Page({
    data: {
      tabs: [
        { id: 1, name: '约拍照', icon: '/images/photo.png', color: '#FFE8B8' },
        { id: 2, name: '约活动', icon: '/images/activity.png', color: '#D1F3FF' },
        { id: 3, name: '约逛街', icon: '/images/shopping.png', color: '#FFD1E7' }
      ],
      recentActivities: [
        {
          id: 1,
          title: '深圳咖啡探店',
          avatar: '/images/default-avatar.png',
          status: '进行中'
        }
      ],
      remote_src: app.globalData.remote_src,
      city: app.globalData.location,
      group_link:{
        "深圳市": "123",
        "广州市": "456"
      }
    },
    onLoad() {
      console.log("link:",this.data.group_link[this.data.city])
    },
    onTabTap(e) {
      const id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: `/pages/publish/activity/activity?id=${id}`
      });
    },

    onClose() {
        wx.switchTab({
          url: '/pages/mine/mine'
        });
    }
  })